Home Page
Mortimer's Page

HTML Crib sheet


Simple Index / Glossary of HTML Tags

The page heading above is contructed as follows

<H1 ALIGN=CENTER> Simple Index / Glossary of HTML Tags</H1>

This web page is being written step by step as I read and learn about each tag and HTML. I am writing it to do the following;

There may well be inaccuracies in my descriptions of the tag, or examples of bad practice. These should hopefully be corrected over time as I learn more about HTML.

So please do not be anoyed or offended if you find any mistakes etc. But do drop me a line and educate me on what I may not understand.

Best Wishes to you all!



Contents

  1. &
  2. ! - Comment tag in the source code
  3. A - Anchor & Hyperlinks
  4. ADDRESS - Define content as an Adress
  5. ALIGN - Format text alignment to Left, Center, Right
  6. ASCII Characters - The ASCII character set
  7. BLOCKQUOTE - Define content as a Quote from an external source
  8. BODY - Defines the content as the 'body' of the document
  9. BR - Line break, like a carriage return i.e. start a new line
  10. CITE - Defines the content as a citation
  11. CODE - Defineds the content as code e.g. computer program listing
  12. DOCTYPE - Declares the html document type
  13. DL -
  14. DT -
  15. DD -
  16. EM - Add Emphasis to the following text
  17. Hx - Formats the following text as a heading, x = 1 to 6
  18. HEAD - Defines the content as the header of the html document
  19. HTML - Defines the content as HTML
  20. HR - Horizontal rule. Draws a line across the page
  21. I - Formats the follwing text as itlaic
  22. IMG - Embeds an image into the doucment
  23. KBD - Defines the foolowing text as to be typed by the user
  24. LI - List item to occur in an unordered or ordere list
  25. OL - Defines an ordered list
  26. P - Defines the follwing content as a paragraph
  27. PRE - Forces the web broswer to use the formatting in the source code
  28. SAMP -
  29. SMALL - Set the font size to small
  30. STYLE defines the formatting of the text and/or the document
  31. TABLE - Defines a table
  32. TD - Table Data for a cell in a table
  33. TH - Table header, defines a header for a table
  34. TITLE - Deinfes the follwing text as the title of the html page
  35. TR - Table row, starts a new row in a table
  36. UL - Defines an Unordered list


Document Type declaration

All HTML documents should have a type declaration at the top. The decalaration content is not displayed in the web browsers. The declaration format is as follows;

Example; <DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

The meaning and purpose of each part of this declaration is as follows;
TO BE COMPLETED

Contents



Emphasis tag


Example; <EM>Emphasis tag</EM>

The Emphasis tag is used to emphasis a important or more significant pice of text from the rest of the doucment / section / page

The emphasis tag does not give control over how the emphasis is performed. This is determined by the browser and its settings

Contents



Heading tag


Example; <H2>Heading tag</H>
Note, levels 5 and 6 may not be shown on all web browsers consistantly or reliably. Use with some care or simply avoid using them.

Contents



Paragraph tag


Example; <P {ATTRIBUTE}>This is a paragrah</P>

<P ALIGN=LEFT>

The Paragraph tag is used to declare a section of text to be of the same paragraph. A line break will be inserted at the start of the paragraph. Further white spaces and white lines in the source will be ignored. Optional attibutes can be used to set the paragraph formatting & style.

<P ALIGN=CENTER>

A line break is inserted. The Text aligment is now set to centre. Further white spaces and white lines in the source will be ignored.

<P ALIGN=RIGHT>

A line break is inserted. The Text aligment is now set to right. Further white spaces and white lines in the source will be ignored. This sentence is a line break away from the previous sentence in the source. This can aid readability of the source but appears to be part of the paragraph above in the browser view.

</P>

The text now retruns to the normal alignment set outside the paragraph tag.

Contents



Style tag

This is a biggy! Text copied from other site - re-write

Defines a style in a document. The style element goes in the head section. If you want to include a style sheet in your page, you should define the style sheet externally, and link to it using <link>>

<head>
<style type="text/css">
h1 {color: red}
h3 {color: blue}
</style>
</head>

See http://www.w3schools.com/css/css_reference.asp

Contents



Top of Page

(Updated: 25th August 2008)